<template>
    <div class="options">
        <div class="option active" style="--optionBackground:url(@/assets/jpg/1.jpg);" id="item1">
            <div class="shadow"></div>
        </div>
        <div class="option" style="--optionBackground:url(@/assets/jpg/2.jpg);" id="item2">
            <div class="shadow"></div>
        </div>
        <div class="option" style="--optionBackground:url(@/assets/jpg/3.jpg);" id="item3">
            <div class="shadow"></div>
        </div>
        <div class="option" style="--optionBackground:url(@/assets/jpg/4.jpg);" id="item4">
            <div class="shadow"></div>
        </div>
    </div>
</template>

<script setup lang="ts">


</script>

<style scoped>
.options {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    overflow: hidden;
    min-width: 600px;
    max-width: 900px;
    width: calc(100% - 100px);
    height: 400px;
}

 .option {
    position: relative;
    overflow: hidden;
    min-width: 60px;
    margin: 10px;
    background: var(--optionBackground);
    background-size: auto 120%;
    background-position: center;
    cursor: pointer;
    transition: 0.5s cubic-bezier(0.05, 0.61, 0.41, 0.95);
}
 .option.active {
    flex-grow: 10000;
    transform: scale(1);
    max-width: 600px;
    margin: 0px;
    border-radius: 40px;
    background-size: auto 100%;
}

 .options .option.active .shadow {
    box-shadow: inset 0 -120px 120px -120px black, inset 0 -120px 120px -100px black;
}

 .options .option:not(.active) {
    flex-grow: 1;
    border-radius: 30px;
}

 .options .option:not(.active) .shadow {
    bottom: -40px;
    box-shadow: inset 0 -120px 0px -120px black, inset 0 -120px 0px -100px black;
}

.options .option .shadow {
    position: absolute;
    bottom: 0px;
    left: 0px;
    right: 0px;
    height: 120px;
    transition: 0.5s cubic-bezier(0.05, 0.61, 0.41, 0.95);
}
</style>